<?php

/**
 * Demo of Log_XML_StringSimple.
 * 
 * PHP version 5
 * 
 * @category Logging
 * @package  Log
 * @author   Michael "Vladimyr" Gower <MichaelPeterGower@gmail.com>
 * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
 * @link     http://pear.php.net/pepr/pepr-proposal-show.php?id=487
 */


/**
 * Require Xtj.php, no need to include 'Log'.
 */
require_once 'Log/XML/String/Simple.php';

// the work proper
$xmlLog = Log::singleton('XML_String_Simple', "LocalSimpleLog.xml"); // get the singleton
$xmlLog->open(); // this step optional
$xmlLog->log("Log appended!");
$xmlLog->log("Cool stuff.");
$xmlLog->flush(); // manually flush, but also optional
// Display the beautified XML of the log so far.
//echo 'New log from Log_XML_Xtj:' . $xmlLog->getFormattedXML();
echo "Log saved to LocalSimpleLog.xml";

?>